// stars/star.js
Component({
  properties: {
    stars:{
      type:Number,
      value:0
    },
    ishide:{
      type:Number,
      value:1
    }
  },

  lifetimes:{
    attached:function(){
    //  console.log(this.data.stars)
  
     let fstar = 'a'.repeat(Math.floor(this.data.stars/2)) //aaa
     let hstar = this.data.stars % 2 != 0                  
     let estar = 'a'.repeat(Math.floor((10-this.data.stars)/2)) //a
    //  console.log(estar);
      this.setData({
        fstar,hstar,estar
      })
    }
  },
  methods:{
    onLoad(){
      console.log("a");
    },
    updateRete:function(){
      // console.log("ssssss")
      let fstar = 'a'.repeat(Math.floor(this.data.stars/2))
      let hstar = this.data.stars % 2 != 0
      let estar = 'a'.repeat(Math.floor((10-this.data.stars)/2))
      
       this.setData({
         fstar,hstar,estar
       })
    }
  }

})
